import { weekDay } from "@/mockData/dayData";

export let option = function () {
    return {
        tooltip: {
            trigger: 'axis'    //鼠标悬浮提示
        },
        toolbox: {
            show: true,
        },
        title: {
            left: 'center',
            text: 'Large Ara Chart'
        },
        xAxis: {
            type: 'category',
            data: weekDay(),
            axisLine: {//x轴线的颜色以及宽度
                show: true,
                lineStyle: {
                    color: "rgba(44, 135, 232, 0.5)",
                }
            },
            axisLabel: {//x轴文字的配置
                show: true,
                textStyle: {
                    color: "rgba(44, 135, 232, 1)",
                }
            },
            boundaryGap: false
        },
        yAxis: {
            scale: true,
            type: 'value',
            axisLine: {//x轴线的颜色以及宽度
                show: true,
                lineStyle: {
                    color: "rgba(44, 135, 232, 0.5)",
                }
            },
            axisLabel: {//x轴文字的配置
                show: true,
                textStyle: {
                    color: "rgba(44, 135, 232, 1)",
                }
            },

        },
        grid: { //距离各个地方的边距 1
            left: '5%',
            right: '5%',
            bottom: '2%',
            top: "20%",
            containLabel: true
        },
        series: [
            {
                data: [],
                type: 'line',
                smooth: true,
                markPoint: {
                    data: [
                        { type: 'max', name: 'Max' },
                        { type: 'min', name: 'Min' }
                    ]
                },
                markLine: {
                    symbol:'none',
                    data: [{
                        type: 'average',
                        name: 'Avg',
                        lineStyle: {
                            color: "#00ffff",
                        },
                        label: {
                            color: '#fff',
                            position: "insideEndTop"
                        }
                    }]
                }
            }
        ]
    };
}